//
//  ViewController.m
//  枚举—ENUM
//
//  Created by adiljan on 16/3/31.
//  Copyright © 2016年 adiljan. All rights reserved.
//

#import "ViewController.h"
#import "AViewController.h"
#import "BViewController.h"
#import "CViewController.h"

@interface ViewController ()
{
    AViewController *aView;
    BViewController *bView;
    CViewController *cView;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.navigationItem.title = @"首页";
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)btnAClick:(UIButton *)sender {
    
    switch (sender.tag) {
        case 1:
            aView = [[AViewController alloc]initWithNibName:@"AViewController" bundle:nil];
            [self.navigationController pushViewController:aView animated:YES];
            break;
        case 2:
            bView = [[BViewController alloc]initWithNibName:@"BViewController" bundle:nil];
            [self.navigationController pushViewController:bView animated:YES];
            break;
        case 3:
            cView = [[CViewController alloc]initWithNibName:@"CViewController" bundle:nil];
            [self.navigationController pushViewController:cView animated:YES];
            break;
        default:
            break;
    }
    
}


@end
